# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=waylandpp
pkgver=1.0.0
pkgrel=1
arch="all"
url="https://github.com/NilsBrause/waylandpp"
options="!check" # No tests are run
pkgdesc="Wayland C++ bindings"
license="MIT AND GPL-3.0-or-later"
depends_dev="
	mesa-dev
	pugixml-dev
	wayland-dev
	"
makedepends="$depends_dev
	cmake
	doxygen
	graphviz
	samurai
	"
source="https://github.com/nilsbrause/waylandpp/archive/$pkgver/waylandpp-$pkgver.tar.gz
	gcc13.patch
	"
subpackages="$pkgname-dev $pkgname-doc"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
64b59d073a0593ecf442362eb63ec0a9dfeaa1ad1d56b5955cb0c159fd01dc45e012b926811c6ca0dc12d4bb2e640eabc2e778ab7d28de2098eb694d26f01039  waylandpp-1.0.0.tar.gz
1134f5d0330b09fb84b8a59f91faa7752f5077be1a25f2464bae8da9d2e725cf28c00f20d1f86b25adc2627c89526369d50ca65c330550ca4c8b8c6a13eb6963  gcc13.patch
"
